import type { AxiosRequestConfig, AxiosResponse } from "axios"
// 定义接口返回一些 请求=》成功 失败 响应=》成功 失败
export interface HYRequestInterceptors<T = AxiosResponse> {
  requestInterceptor?: (config: any) => any
  requestInterceptorCatch?: (err: any) => any
  responseInterceptor?: (res: T) => T
  responseInterceptoCatch?: (error: any) => any
}
// 在原有的配置添加新的配置
export interface HYRequestConfig<T = AxiosResponse> extends AxiosRequestConfig {
  interceptors?: HYRequestInterceptors<T>
  showLoading?: boolean
}
